<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>对象</title>
    <script type="text/javascript">
        // 创建对象
        var dog = {
            age: 18,
            name: '小宝',
            length: 103.1,
            dogFriend: ['嘟嘟', '小虎'],
            eat: function (foodName) {
                console.log(this.name + '吃饭饭啦' + foodName);
            },
            run: function (place) {
                console.log(this.name + '出去跑步啦' + place);
            }
        };
        console.log(typeof dog)

        // 输出狗的相关信息
        console.log(dog.name);
        dog.eat('骨头');
        dog.run('草坪');
    </script>
</head>
<body>

</body>
</html>